<template>
	<!-- 邮币 废弃 -->
	<view class="content">
		<view class="head-bg">
			<view class="head-user">
				<view class="user">
					<image :src="imgUrl+'/static/image/my/user_pic.jpg'" mode=""></image>
					<text>爱跳舞的汤姆</text>
				</view>
				<view class="exchange" @click="onExchangeRecord">
					<text>兑换记录</text>
					<text class="iconfont icon-more"></text>
				</view>
			</view>
			<view class="integral-balance">
				<view class="integral" @click="onIntegral">
					<text>当前可用邮币</text>
					<text class="number">10000</text>
				</view>
			</view>
			<view class="bg">
				<image :src="imgUrl+'/static/image/my/integral_bg1.png'" mode=""></image>
			</view>
		</view>
		<view class="coupon-exchange">
			<view class="exchange-title">
				<view class="title">优惠券兑换</view>
			</view>
			<view class="coupon-list">
				<view class="list" v-for="(item,index) in 6"
					@click="onExchange(0)"
					:key="index">
					<view class="thumb">
						<image src="" mode="" :style="{backgroundImage: 'url(' + imgUrl + '/static/image/my/coupon_default.png)'}"></image>
					</view>
					<view class="title">10元直减优惠券</view>
					<view class="integral">1000邮币</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		computed:{
			imgUrl(){
				return this.$imgUrl
			}
		},
		onLoad() {

		},
		mounted() {

		},

		methods: {
			onExchange(){
				uni.navigateTo({
					url: '/pages/ExchangeDetails/ExchangeDetails',
				})
			},
			onExchangeRecord() {
				uni.navigateTo({
					url: '/pages/ExchangeRecord/ExchangeRecord',
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
		background-color: #f6f6f6;
	}
	.head-bg{
		position: relative;
		width: 100%;
		height: 400rpx;
		// background: linear-gradient($base,$change-clor);
		background-color: #28AAA9;
		.head-user{
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0 4%;
			height: 100rpx;
			.user{
				display: flex;
				align-items: center;
				image{
					width: 70rpx;
					height: 70rpx;
					border-radius: 100%;
				}
				text{
					font-size: 28rpx;
					color: #FFFFFF;
					margin-left: 20rpx;
				}
			}
			.exchange{
				display: flex;
				align-items: center;
				text{
					font-size: 28rpx;
					color: #FFFFFF;
				}
			}
		}
		.integral-balance{
			display: flex;
			align-items: center;
			justify-content: center;
			width: 100%;
			height: 200rpx;
			.integral{
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				text{
					font-size: 30rpx;
					color: #FFFFFF;
				}
				.number{
					font-size: 60rpx;
					margin-top: 10rpx;
					// font-weight: bold;
				}
			}
		}
		.bg{
			position: absolute;
			left: 0;
			bottom: 0;
			width: 100%;
			height: 40rpx;
			image{
				width: 100%;
				height: 100%;
			}
		}
	}
	.exchange-title{
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 100rpx;
		.title{
			font-size: 28rpx;
			font-weight: bold;
			color: #222222;
		}
	}
	.coupon-exchange{
		width: 100%;
		margin: 20rpx auto;
		background-color: #FFFFFF;
		border-radius: 20rpx;
		.coupon-list{
			display: flex;
			flex-wrap: wrap;
			padding: 0 4%;
			.list{
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				width: 33%;
				height: 240rpx;
				.thumb{
					width: 100rpx;
					height: 100rpx;
					background-color: #EEEEEE;
					border-radius: 100%;
					overflow: hidden;
					image{
						width: 100%;
						height: 100%;
						background-repeat: no-repeat;
						background-position: center center;
						background-size: 50rpx 50rpx;
					}
				}
				.title{
					font-size: 24rpx;
					font-weight: bold;
					color: #222222;
					margin-top: 20rpx;
				}
				.integral{
					font-size: 28rpx;
					font-weight: bold;
					color: #28AAA9;
					margin-top: 10rpx;
				}
			}
		}
	}
</style>
